﻿using System.Windows.Forms.Integration;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Project;
using theeg.DependencyAnalysis.CommonAddin;
using theeg.DependencyAnalysis.CommonAddin.Models;

namespace theeg.DependencyAnalysis.SdAddin
{
    public class ToolWindow : AbstractViewContent
    {
        private readonly ElementHost _addinHost;
        private readonly AddinWindow _addinWindow;

        public override object Control
        {
            get { return _addinHost; }
        }

        public ToolWindow()
        {
            TitleName = "DependencyAnalysis (Egg and Gherkin)";
            _addinWindow = new AddinWindow
                {
                    DataContext = new AddinModel(new SdSolution(ProjectService.OpenSolution))
                };
            _addinHost = new ElementHost { Child = _addinWindow };
        }
    }
}
